<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #box{
      width: 200px;
      height: 200px;
      margin: 40px auto;
      background-color: rgb(200, 179, 44);
    }
  </style>
</head>
<body>
  <div id="app">
    <button v-on:click="changeMsg('你好世界')">按钮</button>
    <button v-on:click="changeMsg('我不好')">按钮</button>
    <hr>
    {{msg}}
  </div>
  <script src="./vue.global.js"></script>
  <script>
    // 创建应用实例
    const { createApp } = Vue;
    const app = createApp({
      data(){
        return {
          msg:'你好vue'
        }
      },
      methods: {
        changeMsg (msg) {
          this.msg = msg;
        }
      }
    })
    app.mount("#app")
  </script>
</body>
</html>